//
//  ZHAQController.m
//  FruitsWholesaler
//
//  Created by sgone-2 on 15/11/29.
//  Copyright © 2015年 sgone. All rights reserved.
//

#import "ZHAQController.h"
#import "XGMMViewController.h"

@interface ZHAQController ()<UITableViewDataSource,UITableViewDelegate>

@property (weak, nonatomic) IBOutlet UITableView *tableView;
@end

@implementation ZHAQController

- (void)viewDidLoad {
    [super viewDidLoad];
  
    self.title = @"账户安全";
    self.backBtn.hidden = NO;
    
    
    
    
    
    
}


-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{


    return 1;

}




-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return 2;


}




-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{

    return 15;

}



-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    return 50;


}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

   static NSString *CellIdentifiler = @"Cell";
    
    
    
    
    UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifiler];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.textLabel.font = [UIFont systemFontOfSize:16];
    cell.textLabel.textColor = [UIColor grayColor];
    
    
    
    
    if (indexPath.row == 0)
    {
        cell.textLabel.text = @"登录账户";
        UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(ViewWidth -200, 0, 200-12, 44)];
        lbl.text = self.dataHandler.phone;
        lbl.textAlignment = NSTextAlignmentRight;
        lbl.font = [UIFont systemFontOfSize:15];
        [cell addSubview:lbl];

    }
    else
    {
    
        
    cell.textLabel.text = @"修改密码";
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    
    }
    
    return cell;

}


-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{


    if (indexPath.row == 0) {
        return;
    }
    else
    {
    
        XGMMViewController *xg = [[XGMMViewController alloc]initWithNibName:nil bundle:nil];
        
        
        
        [self.navigationController pushViewController:xg animated:YES];
    
    }


}


@end
